<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>GetMailAttribute</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">GetMailAttribute()</font></b></p>
<p><b>Syntax</b></p><blockquote>

Result$ = <font color="#006666"><b>GetMailAttribute</b></font>(#Mail, Attribute)</blockquote>

</blockquote>
<b>Description</b><br><blockquote>



Return the specified mail attribute. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Mail</i></td>
<td width="90%"> 
 
The mail to use. 

 

</td></tr>
<tr><td><i>Attribute</i></td>
<td> 
 
The attribute to get. It may be one of the following values: 
 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Mail_From</font>   : Get the 'From' attribute, set with <a href="createmail.html">CreateMail()</a>.
  <font color="#924B72">#PB_Mail_Subject</font>: Get the 'Subject' attribute, set with <a href="createmail.html">CreateMail()</a>.
  <font color="#924B72">#PB_Mail_XMailer</font>: Get the 'X-Mailer' attribute (if any)
  <font color="#924B72">#PB_Mail_Date</font>   : Get the 'Date' attribute (if any)
  <font color="#924B72">#PB_Mail_Custom</font> : Get customs fields (if any)
</font></pre>

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>



Returns the attribute as a string. An empty string is returned if the attribute does not exist. 

 

</blockquote><p><b>Remarks</b></p><blockquote>

<a href="setmailattribute.html">SetMailAttribute()</a> may be used to change the #Mail attributes. 

 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2"><font color="#006666">  InitNetwork</font>()

  <b><font color="#006666">If</font></b> <font color="#006666">CreateMail</font>(0, "test@purebasic.com", "Hello")
    <b><font color="#006666">Debug</font></b> <font color="#006666">GetMailAttribute</font>(0, <font color="#924B72">#PB_Mail_From</font>)    <font color="#006666">; Will print "test@purebasic.com"</font>
    <b><font color="#006666">Debug</font></b> <font color="#006666">GetMailAttribute</font>(0, <font color="#924B72">#PB_Mail_Subject</font>) <font color="#006666">; Will print "Hello"</font>
  <b><font color="#006666">EndIf</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="setmailattribute.html">SetMailAttribute()</a>, <a href="createmail.html">CreateMail()</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center>&lt;- <a href=freemail.html>FreeMail()</a> - <a href=index.html>Mail Index</a> - <a href=getmailbody.html>GetMailBody()</a> -&gt;



</body></html>